package com.bonc.modules.sys.dao;

import com.bonc.datasource.annotation.DataSource;
import com.bonc.modules.sys.entity.OriginUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.ResultHandler;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author jinlong
 * @date 2021/7/1
 */
@Mapper
public interface OriginUserDao {


    //    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
//    @ResultType(OriginUserEntity.class)
    @DataSource("data")
    void getOriginUser(@Param("lastSyncDate") Date lastSyncDate, ResultHandler<OriginUserEntity> handler);


    @DataSource("data")
    int getChangeUserCount(@Param("lastSyncDate") Date lastSyncDate);

    @DataSource("data")
    List<Map<String, String>> getPortalUserByToday();
}
